#ifndef __UART4_H__
#define __UART4_H__

#include "stm32f10x.h"
#include "stm32f10x_usart.h"
#include "log.h"
#include "FreeRTOS.h"

#define USART4_BAUD_RATE 57600
#define UART4_REC_LEN 32

#define Max_BUFF_Len 32
#define Min_BUFF_Len 2
extern u8 Uart4_Buffer_Status_RX[Max_BUFF_Len];
extern u8 Uart4_Buffer_Control_Cmd_Rx[Min_BUFF_Len];


typedef struct
{
    u32 len;
    u8 buf[UART4_REC_LEN];
}UART4_MSG_S;

extern UART4_MSG_S g_stUart4Msg;




typedef void (*P_FUNC_HANDLE_UART_RECEIVE_DATA)(u8* data, u8 len);

//function define
extern void UART4_Init(void);
extern void UART4_Send_Bytes(u8 *Data, u8 len);
extern void UART4_GetReceiveData(u16 *plen, u8 *data);

#endif

